package Pojo;

import java.util.Objects;

//房间实体类
public class Room {
    private Integer room_id;//房间id(主键)
    private String room_name;//房间名称
    private Integer room_price;//房间价格
    private Integer room_pel_num;//房间人数限制
    private Integer room_type_id;//房间类型id（房间类型表主键）
    private Integer room_show_status;//房间上下架状态 0=上架 1=下架

    //下面的属性用于mybatis表关系查询，一对一，一对多，多对多
    //ps:根据代码需求可以自行添加
    private RoomType roomType;//房间类型实体类对象

    public Room() {
    }

    @Override
    public String toString() {
        return "Room{" +
                "room_id=" + room_id +
                ", room_name='" + room_name + '\'' +
                ", room_price=" + room_price +
                ", room_pel_num=" + room_pel_num +
                ", room_type_id=" + room_type_id +
                ", room_show_status=" + room_show_status +
                ", roomType=" + roomType +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Room room = (Room) o;
        return Objects.equals(room_id, room.room_id) &&
                Objects.equals(room_name, room.room_name) &&
                Objects.equals(room_price, room.room_price) &&
                Objects.equals(room_pel_num, room.room_pel_num) &&
                Objects.equals(room_type_id, room.room_type_id) &&
                Objects.equals(room_show_status, room.room_show_status) &&
                Objects.equals(roomType, room.roomType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(room_id, room_name, room_price, room_pel_num, room_type_id, room_show_status, roomType);
    }

    public Integer getRoom_id() {
        return room_id;
    }

    public void setRoom_id(Integer room_id) {
        this.room_id = room_id;
    }

    public String getRoom_name() {
        return room_name;
    }

    public void setRoom_name(String room_name) {
        this.room_name = room_name;
    }

    public Integer getRoom_price() {
        return room_price;
    }

    public void setRoom_price(Integer room_price) {
        this.room_price = room_price;
    }

    public Integer getRoom_pel_num() {
        return room_pel_num;
    }

    public void setRoom_pel_num(Integer room_pel_num) {
        this.room_pel_num = room_pel_num;
    }

    public Integer getRoom_type_id() {
        return room_type_id;
    }

    public void setRoom_type_id(Integer room_type_id) {
        this.room_type_id = room_type_id;
    }

    public Integer getRoom_show_status() {
        return room_show_status;
    }

    public void setRoom_show_status(Integer room_show_status) {
        this.room_show_status = room_show_status;
    }

    public RoomType getRoomType() {
        return roomType;
    }

    public void setRoomType(RoomType roomType) {
        this.roomType = roomType;
    }

    public Room(Integer room_id, String room_name, Integer room_price, Integer room_pel_num, Integer room_type_id, Integer room_show_status, RoomType roomType) {
        this.room_id = room_id;
        this.room_name = room_name;
        this.room_price = room_price;
        this.room_pel_num = room_pel_num;
        this.room_type_id = room_type_id;
        this.room_show_status = room_show_status;
        this.roomType = roomType;
    }
}
